feat(api): introduce select, file and file list form input types to Human Input node#36322
Open
QuantumGhost wants to merge 147 commits into
Open
feat(api): introduce select, file and file list form input types to Human Input node#36322QuantumGhost wants to merge 147 commits into
QuantumGhost wants to merge 147 commits into
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-05-19 08:29:13.521914788 +0000
+++ /tmp/pyrefly_pr.txt 2026-05-19 08:29:01.383815598 +0000
@@ -626,6 +626,10 @@
--> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:184:29
ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagDeletePayload.__init__` [missing-argument]
--> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:196:29
+ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
+ --> tests/test_containers_integration_tests/controllers/web/test_human_input_form.py:47:18
+ERROR Cannot instantiate `DifyAPISQLAlchemyWorkflowRunRepository` because the following members are abstract: `save` [bad-instantiation]
+ --> tests/test_containers_integration_tests/controllers/web/test_human_input_form.py:206:63
ERROR `in` is not supported between `Literal['webapp-logo']` and `None` [not-iterable]
--> tests/test_containers_integration_tests/controllers/web/test_site.py:133:16
ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -1017,7 +1021,7 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_file_service.py:78:20
ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_human_input_delivery_test.py:32:18
+ --> tests/test_containers_integration_tests/services/test_human_input_delivery_test.py:43:18
ERROR Unexpected keyword argument `whole_workspace` in function `core.workflow.human_input_adapter.EmailRecipients.__init__` [unexpected-keyword]
--> tests/test_containers_integration_tests/services/test_human_input_delivery_test_service.py:241:44
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2005,9 +2009,9 @@
ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.workflow.generate_task_pipeline.WorkflowAppGenerateTaskPipeline.__init__` [bad-argument-type]
--> tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py:524:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py:614:33
+ --> tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py:618:33
ERROR Argument `() -> TestHitlServiceApi.test_snapshot_events_include_pause_payload_contract._SessionContext` is not assignable to parameter `session_maker` with type `sessionmaker[Session] | None` in function `services.workflow_event_snapshot_service._build_snapshot_events` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py:687:27
+ --> tests/unit_tests/controllers/service_api/app/test_hitl_service_api.py:691:27
ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
--> tests/unit_tests/controllers/service_api/app/test_message.py:95:63
ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
@@ -2838,9 +2842,9 @@
ERROR Argument `None` is not assignable to parameter `value` with type `Segment | dict[Unknown, Unknown] | list[Unknown]` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter._fetch_files_from_variable_value` [bad-argument-type]
--> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:45:77
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:32:37
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:33:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:33:14
+ --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_human_input.py:34:14
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
--> tests/unit_tests/core/app/apps/common/test_workflow_response_converter_resumption.py:31:37
ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
@@ -3064,65 +3068,68 @@
ERROR Argument `SimpleNamespace` is not assignable to parameter `pause_state_config` with type `PauseStateLayerConfig | None` in function `core.app.apps.workflow.app_generator.WorkflowAppGenerator.resume` [bad-argument-type]
--> tests/unit_tests/core/app/apps/test_workflow_app_generator.py:280:28
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:47:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:50:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:54:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:57:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:86:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:89:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._prepare_single_node_execution` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:91:51
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:94:51
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:94:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:97:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._get_graph_and_variable_pool_for_single_node_run` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:133:22
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:136:22
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:162:27
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:165:27
ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:163:29
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:166:29
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._get_graph_and_variable_pool_for_single_node_run` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:226:22
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:229:22
ERROR Object of class `NoneType` has no attribute `value` [missing-attribute]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:235:16
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:238:16
ERROR Argument `TestWorkflowBasedAppRunner.test_handle_graph_run_events_and_pause_notifications._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:244:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:247:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:270:30
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:273:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:271:30
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:274:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:272:30
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:275:30
ERROR Type `object` is not iterable [not-iterable]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:274:69
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:277:69
ERROR Type `object` is not iterable [not-iterable]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:275:71
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:278:71
ERROR Type `object` is not iterable [not-iterable]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:276:39
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:279:39
ERROR Argument `TestWorkflowBasedAppRunner.test_handle_node_events_publishes_queue_events._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:287:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:290:55
+ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:298:13
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:295:13
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:308:13
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:305:13
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:319:13
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:316:13
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:335:13
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:332:13
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:349:13
+ERROR Argument `TestWorkflowBasedAppRunner.test_handle_human_input_form_filled_event_preserves_submitted_data._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:376:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:346:13
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:388:13
ERROR Argument `TestWorkflowBasedAppRunner.test_handle_start_node_result_events_project_outputs._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:426:55
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:465:55
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:444:30
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:483:30
ERROR Argument `_DummyQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
--> tests/unit_tests/core/app/apps/test_workflow_app_runner_notifications.py:36:51
ERROR Argument `_DummyWorkflowEntry` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
--> tests/unit_tests/core/app/apps/test_workflow_app_runner_notifications.py:52:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:84:26
+ --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:90:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
-ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
- --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+ --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:118:37
+ERROR Object of class `FileInputConfig` has no attribute `option_source`
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
--> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -5325,32 +5332,22 @@
--> tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py:126:35
ERROR Argument `Response` is not assignable to parameter `response` with type `HttpResponse` in function `graphon.nodes.http_request.entities.Response.__init__` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py:161:17
-ERROR Object of class `NoneType` has no attribute `type` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:207:16
-ERROR Object of class `NoneType` has no attribute `value` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:208:16
-ERROR Object of class `NoneType` has no attribute `type` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:218:16
-ERROR Object of class `NoneType` has no attribute `selector` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:219:16
ERROR Object of class `HumanInputNodeData` has no attribute `delivery_methods` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:303:20
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:324:20
ERROR Object of class `HumanInputNodeData` has no attribute `delivery_methods` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:326:20
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:347:20
ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:419:16
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:440:16
ERROR Object of class `BoundRecipient` has no attribute `email` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:420:16
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:441:16
ERROR Missing argument `reference_id` in function `core.workflow.human_input_adapter.BoundRecipient.__init__` [missing-argument]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:424:28
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:445:28
ERROR Unexpected keyword argument `user_id` in function `core.workflow.human_input_adapter.BoundRecipient.__init__` [unexpected-keyword]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:424:61
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:445:61
ERROR Unexpected keyword argument `whole_workspace` in function `core.workflow.human_input_adapter.EmailRecipients.__init__` [unexpected-keyword]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:426:38
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:447:38
ERROR Object of class `SchedulingPause` has no attribute `resolved_default_values` [missing-attribute]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:506:16
-ERROR Argument `Literal['invalid-type']` is not assignable to parameter `type` with type `Literal[FormInputType.PARAGRAPH]` in function `graphon.nodes.human_input.entities.ParagraphInputConfig.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:730:22
+ --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:525:16
ERROR Argument `dict[str, list[str] | str]` is not assignable to parameter `node_data` with type `KnowledgeIndexNodeData | dict[str, object]` in function `_build_node` [bad-argument-type]
--> tests/unit_tests/core/workflow/nodes/knowledge_index/test_knowledge_index_node.py:140:23
ERROR Argument `dict[str, bool]` is not assignable to parameter `summary_index_setting` with type `SummaryIndexSettingDict | None` in function `core.workflow.nodes.knowledge_index.knowledge_index_node.KnowledgeIndexNode._invoke_knowledge_index` [bad-argument-type]
@@ -5453,6 +5450,8 @@
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_node.py:106:12
ERROR Cannot index into `object` [bad-index]
--> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_node.py:107:12
+ERROR Argument `TypeAlias[FormInputConfig, Annotated[FileInputConfig | FileListInputConfig | ParagraphInputConfig | SelectInputConfig]]` is not assignable to parameter `model_class` with type `type[Any]` in function `_validate_legacy_json` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/test_form_input_serialization_compat.py:94:38
ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_pool` with type `VariablePool | None` in function `core.workflow.human_input_adapter.EmailDeliveryConfig.render_body_template` [bad-argument-type]
--> tests/unit_tests/core/workflow/test_human_input_adapter.py:31:23
ERROR Object of class `_InteractiveSurfaceDeliveryConfig` has no attribute `recipients` [missing-attribute]
@@ -5490,39 +5489,39 @@
ERROR `form_repository` may be uninitialized [unbound-name]
--> tests/unit_tests/core/workflow/test_node_factory.py:589:49
ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
- --> tests/unit_tests/core/workflow/test_node_factory.py:857:39
+ --> tests/unit_tests/core/workflow/test_node_factory.py:902:39
ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
- --> tests/unit_tests/core/workflow/test_node_factory.py:987:33
+ --> tests/unit_tests/core/workflow/test_node_factory.py:1032:33
ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
- --> tests/unit_tests/core/workflow/test_node_factory.py:988:39
+ --> tests/unit_tests/core/workflow/test_node_factory.py:1033:39
ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:92:12
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:93:12
ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:107:45
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:108:45
ERROR Argument `SimpleNamespace` is not assignable to parameter `model_instance` with type `ModelInstance` in function `core.workflow.node_runtime.DifyPreparedLLM.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:139:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:140:32
ERROR Argument `SimpleNamespace` is not assignable to parameter `model_instance` with type `ModelInstance` in function `core.workflow.node_runtime.DifyPreparedLLM.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:174:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:175:32
ERROR Argument `SimpleNamespace` is not assignable to parameter `model_instance` with type `ModelInstance` in function `core.workflow.node_runtime.DifyPreparedLLM.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:187:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:188:32
ERROR Argument `SimpleNamespace` is not assignable to parameter `model_instance` with type `ModelInstance` in function `core.workflow.node_runtime.DifyPreparedLLM.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:213:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:214:32
ERROR Argument `Literal['chat']` is not assignable to parameter `model_mode` with type `LLMMode` in function `core.workflow.node_runtime.DifyPromptMessageSerializer.serialize` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:224:20
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:225:20
ERROR Argument `SimpleNamespace` is not assignable to parameter `file_reference_factory` with type `FileReferenceFactoryProtocol` in function `core.workflow.node_runtime.DifyRetrieverAttachmentLoader.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:259:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:260:32
ERROR Object of class `NoneType` has no attribute `storage_key` [missing-attribute]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:270:12
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:271:12
ERROR Argument `SimpleNamespace` is not assignable to parameter `file_reference_factory` with type `FileReferenceFactoryProtocol` in function `core.workflow.node_runtime.DifyRetrieverAttachmentLoader.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:335:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:336:32
ERROR Argument `SimpleNamespace` is not assignable to parameter `file_reference_factory` with type `FileReferenceFactoryProtocol` in function `core.workflow.node_runtime.DifyRetrieverAttachmentLoader.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:361:32
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:362:32
ERROR Object of class `object` has no attribute `tool` [missing-attribute]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:463:12
-ERROR Object of class `object` has no attribute `parent_trace_context` [missing-attribute]
--> tests/unit_tests/core/workflow/test_node_runtime.py:464:12
+ERROR Object of class `object` has no attribute `parent_trace_context` [missing-attribute]
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:465:12
ERROR Object of class `object` has no attribute `tool` [missing-attribute]
- --> tests/unit_tests/core/workflow/test_node_runtime.py:499:12
+ --> tests/unit_tests/core/workflow/test_node_runtime.py:500:12
ERROR Argument `TestWorkflowEntry.test_single_step_run_injects_code_limits.StubWorkflow` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
--> tests/unit_tests/core/workflow/test_workflow_entry.py:145:22
ERROR Object of class `_FakeModelNodeMixin` has no attribute `node_data` [missing-attribute]
@@ -5613,18 +5612,18 @@
--> tests/unit_tests/factories/test_file_factory.py:285:16
ERROR `in` is not supported between `Literal['.txt']` and `None` [not-iterable]
--> tests/unit_tests/factories/test_file_factory.py:286:16
-ERROR `dict[str, str | None]` is not assignable to TypedDict key `site` with type `list[dict[str, Any]] | list[dict[str, LiteralString | str]] | str` [bad-typed-dict-key]
+ERROR `dict[str, str | None]` is not assignable to TypedDict key `site` with type `list[dict[str, Any]] | list[dict[str, str]] | str` [bad-typed-dict-key]
--> tests/unit_tests/libs/_human_input/support.py:102:32
-ERROR `dict[str, str]` is not assignable to TypedDict key `site` with type `list[ParagraphInputConfig] | list[dict[str, Any]] | str` [bad-typed-dict-key]
+ERROR `dict[str, str]` is not assignable to TypedDict key `site` with type `list[FormInputConfig] | list[dict[str, Any]] | str` [bad-typed-dict-key]
--> tests/unit_tests/libs/_human_input/support.py:217:34
ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
- --> tests/unit_tests/libs/_human_input/test_models.py:66:21
+ --> tests/unit_tests/libs/_human_input/test_models.py:65:21
ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
- --> tests/unit_tests/libs/_human_input/test_models.py:77:21
+ --> tests/unit_tests/libs/_human_input/test_models.py:76:21
ERROR `<=` is not supported between `datetime` and `None` [unsupported-operation]
- --> tests/unit_tests/libs/_human_input/test_models.py:122:16
+ --> tests/unit_tests/libs/_human_input/test_models.py:121:16
ERROR `<=` is not supported between `None` and `datetime` [unsupported-operation]
- --> tests/unit_tests/libs/_human_input/test_models.py:122:16
+ --> tests/unit_tests/libs/_human_input/test_models.py:121:16
ERROR Object of class `Subscription` has no attribute `_start_if_needed` [missing-attribute]
--> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:158:17
ERROR Object of class `Subscription` has no attribute `_start_if_needed` [missing-attribute]
@@ -6046,8 +6045,12 @@
--> tests/unit_tests/services/test_external_dataset_service.py:1423:16
ERROR Argument `Literal['invalid']` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown] | None` in function `services.file_service.FileService.__init__` [bad-argument-type]
--> tests/unit_tests/services/test_file_service.py:48:41
+ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
+ --> tests/unit_tests/services/test_human_input_file_upload_service.py:37:16
+ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.drop_all` [bad-argument-type]
+ --> tests/unit_tests/services/test_human_input_file_upload_service.py:55:20
ERROR `in` is not supported between `Literal['form_id=test-form']` and `None` [not-iterable]
- --> tests/unit_tests/services/test_human_input_service.py:320:12
+ --> tests/unit_tests/services/test_human_input_service.py:545:12
ERROR Argument `None` is not assignable to parameter `type` with type `Literal['number', 'string', 'time']` in function `services.entities.knowledge_entities.knowledge_entities.MetadataArgs.__init__` [bad-argument-type]
--> tests/unit_tests/services/test_metadata_bug_complete.py:18:31
ERROR Argument `None` is not assignable to parameter `name` with type `bytearray | bytes | str` in function `services.entities.knowledge_entities.knowledge_entities.MetadataArgs.__init__` [bad-argument-type]
@@ -6175,11 +6178,11 @@
ERROR `Literal['2']` is not assignable to TypedDict key `limit` with type `int` [bad-typed-dict-key]
--> tests/unit_tests/services/test_workflow_run_service.py:132:103
ERROR Missing required key `id` for TypedDict `NodeConfigDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_workflow_service.py:2755:71
+ --> tests/unit_tests/services/test_workflow_service.py:2760:71
ERROR Missing required key `data` for TypedDict `NodeConfigDict` [bad-typed-dict-key]
- --> tests/unit_tests/services/test_workflow_service.py:2755:71
-ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.workflow_service.WorkflowService._build_human_input_node` [bad-argument-type]
- --> tests/unit_tests/services/test_workflow_service.py:2842:65
+ --> tests/unit_tests/services/test_workflow_service.py:2760:71
+ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.workflow_service.WorkflowService._build_human_input_node_for_debugging` [bad-argument-type]
+ --> tests/unit_tests/services/test_workflow_service.py:2848:65
ERROR Argument `Literal['api_key']` is not assignable to parameter `credential_type` with type `CredentialType` in function `services.tools.builtin_tools_manage_service.BuiltinToolManageService.list_builtin_provider_credentials_schema` [bad-argument-type]
--> tests/unit_tests/services/tools/test_builtin_tools_manage_service.py:91:89
ERROR Object of class `Mapping` has no attribute `startswith` [missing-attribute]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #36322 +/- ##
==========================================
+ Coverage 85.99% 86.01% +0.02%
==========================================
Files 4458 4471 +13
Lines 211918 212975 +1057
Branches 39544 39806 +262
==========================================
+ Hits 182232 183194 +962
- Misses 26471 26537 +66
- Partials 3215 3244 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace `&&` with ternary operator. ref: https://www.eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull requests introduces the following form input types to human input node:
Closes #34595.
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods